﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StyleMVVM.DependencyInjection.Impl;

namespace StyleMVVM.DependencyInjection.Conditions
{
	public class ExportWhenConfigValueNotPresentOrFalseAttribute : IExportConditionAttribute
	{
		private string configName;
		private bool cache;

		public ExportWhenConfigValueNotPresentOrFalseAttribute(string configName)
		{
			this.configName = configName;
			this.cache = true;
		}

		public ExportWhenConfigValueNotPresentOrFalseAttribute(string configName, bool cache)
		{
			this.configName = configName;
			this.cache = cache;
		}

		public IExportCondition ProvideCondition(Type exportType)
		{
			return new WhenConfigValueNotPresentOrFalse(configName, cache);
		}
	}
}
